import type { RouteRecordRaw } from 'vue-router'

/* 系统内置常量路由 */
export const constantRouterMap: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/dashboard',
    name: 'Root',
  },
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'Login',
    meta: {
      title: '登录',
    },
  },
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: () => import('@/views/dashboard/index.vue'),
    meta: {
      title: '看板',
    },
  },
  {
    path: '/redirect/:path(.*)',
    name: 'Redirect',
    component: () => import('@/views/redirect/index.vue'),
    meta: {
      title: '重定向',
    },
  },
  {
    path: '/404',
    component: () => import('@/views/error/404.vue'),
    name: 'NoFind',
    meta: {
      title: '404',
    },
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'PathMatch404',
    meta: {
      title: '404',
    },
  },
]
